package com.design.movieticket.dto;

import com.design.movieticket.entity.Coupon;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

@Data
@AllArgsConstructor
@NoArgsConstructor
@SuperBuilder(toBuilder = true)
public class CouponDto implements Serializable {
    @JsonSerialize(using = ToStringSerializer.class)
    Long id;

    String couponName;//优惠卷名

    String couponType;//优惠卷类型

    String details;//优惠卷描述

    BigDecimal startPay;//起始金额

    String couponDiscount;//活动力度

    @JsonFormat(pattern = "yyyy年MM月dd日 HH:mm")
    LocalDateTime couponStartTime;//活动开始时间

    @JsonFormat(pattern = "yyyy年MM月dd日 HH:mm")
    LocalDateTime couponEndTime;//活动结束时间
}
